package keeto.com.vn.classified.database;

public class DBString {
	
	public static String[] CREATE_TABLES = {
		"CREATE TABLE Service (localId  integer primary key autoincrement, "
				+ "status text not null, displayName text not null,username text not null, password text not null, presence text not null);",
			"CREATE TABLE AccountInfo (localId  integer primary key autoincrement, "
					+ "key text not null, info text not null, lastUpdate integer not null);",
			"CREATE TABLE BuitinService (localId  integer primary key autoincrement, "
					+ "serviceLocalId integer not null, Authkey text not null,DisplayName text not null,Status text not null, SuperUser text not null,userId text,UserPhone text not null, UserEmail text not null,AreaID text not null,displayAvatar blob not null, Sex integer not null);",	
			"CREATE TABLE ProductHistory (localId  integer primary key autoincrement,ProductID text not null, lastUpdate integer not null);",	
			"CREATE TABLE IACategory (localId  integer primary key autoincrement, "
					+ "remote_id text not null, parent_remote_id text not null, name text not null, publish_template text not null, search_template text not null, icon text, sort integer not null, state integer not null, isHot integer not null, type integer, linkId text);",
			"CREATE TABLE IAArea (localId  integer primary key autoincrement, "
					+ "remote_id text not null, parent_remote_id text not null, name text not null, alias1 text not null, alias2 text not null,abbreviation text, sort integer not null, state integer not null, level integer);"	
		 };

	/**
	 * @category the table witch version is 23
	 * */
	public static String[] TABLES_23 = {"Service","AccountInfo","BuitinService","ProductHistory", "IACategory", "IAArea"};
	
	/**
	 * @category the table witch version is the newest
	 * */
	public static String[] TABLES_NEWEST = {"Service","AccountInfo","BuitinService","ProductHistory", "IACategory", "IAArea"};

	public final static String DB_NAME = "User_DataBase.db";
	/**
	 * @category Start version is 23, 2012-06-21 version is 24, 2012-06-23
	 *           version is 25, 2012-07-30 version is 26, 2012-08-06 version is
	 *           27, 2012-08-10 version is 28,2012-09-06 version is 29
	 * */
	public static final int DB_VERSION = 30;

	public static final String IA_META_DB_NAME = "IA_DataBase.db";

	/**
	 * when regenerate IA_DataBase.db and import new db file to the im project,
	 * you need add 1 to IA_META_DB_VERSION manually, and thus new ia db is
	 * automatically cover old ia db.
	 * 
	 * e.g. { (1)old IA_META_DB_VERSION = 9 (2)import new IA_DataBase.db, and
	 * delete old IA_DataBase.db (3)add 1, IA_META_DB_VERSION = 10 (4)run im
	 * 
	 */
	public static int IA_META_DB_VERSION = 16;

	public static String SP_NAME = "IM_SP";
	public static String SP_AUTHKEY = "Authkey";
	public static String SP_AUTHKEY_NEW = "Authkey_New";
	public static String SP_ACK_LOGON = "AckLogon";
}
